import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '名称',
    align: "center",
    dataIndex: 'name'
  },
  {
    title: '拼音',
    align: "center",
    dataIndex: 'namePy'
  },
  {
    title: 'logo',
    align: "center",
    dataIndex: 'logo',
    customRender: render.renderImage,
  },
  {
    title: '状态',
    align: "center",
    dataIndex: 'status',
    customRender:({text}) => {
       return  render.renderSwitch(text, [{text:'正常',value:'Y'},{text:'禁用',value:'N'}]);
     },
  },
  {
    title: '排序',
    align: "center",
    dataIndex: 'sort'
  },
  {
    title: '备注',
    align: "center",
    dataIndex: 'remark'
  },
];

// 高级查询数据
export const superQuerySchema = {
  name: {title: '名称',order: 0,view: 'text', type: 'string',},
  namePy: {title: '拼音',order: 1,view: 'text', type: 'string',},
  logo: {title: 'logo',order: 2,view: 'image', type: 'string',},
  status: {title: '状态',order: 3,view: 'switch', type: 'string',},
  cityList: {title: '默认城市',order: 4,view: 'pca', type: 'string',},
  sort: {title: '排序',order: 5,view: 'number', type: 'number',},
  remark: {title: '备注',order: 6,view: 'textarea', type: 'string',},
};
